﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Jok.Server.Infrastructure
{
    [DataContract]
    public class JokCommand
    {
        [DataMember]
        public int Command { get; set; }

        [DataMember]
        public int SubCommand { get; set; }

        [DataMember]
        public IEnumerable<object> Parameters { get; set; }


        public override string ToString()
        {
            string ParametersString = String.Empty;
            if (Parameters != null)
                foreach (var param in Parameters)
                {
                    ParametersString += String.Format("{0}_", param);
                }

            return String.Format("Command: {0}, SubCommand: {1}, Parameters: {2}", Command, SubCommand, ParametersString);
        }
    }
}
